//
//  XSMineViewController.m
//  AudioVideo
//
//  Created by xueshan1 on 2019/8/29.
//  Copyright © 2019 xueshan1. All rights reserved.
//

#import "XSMineViewController.h"
#import "XSVideoListViewController.h"

@interface XSMineViewController ()

@end

@implementation XSMineViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationController.navigationBarHidden = YES;

     
}

- (void)setupUI{
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
    btn.frame = CGRectMake(0, 100, 200, 40);
    btn.backgroundColor = [UIColor redColor];
    btn.layer.borderWidth = 1;
    btn.layer.borderColor = [UIColor lightGrayColor].CGColor;
    [btn setTitle:@"temp" forState:UIControlStateNormal];
    [btn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [btn addTarget:self action:@selector(tempbtnClicked:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn];
    
    UIButton *docBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    docBtn.frame = CGRectMake(0, 200, 200, 40);
    docBtn.backgroundColor = [UIColor redColor];
    docBtn.layer.borderWidth = 1;
    docBtn.layer.borderColor = [UIColor lightGrayColor].CGColor;
    [docBtn setTitle:@"document" forState:UIControlStateNormal];
    [docBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [docBtn addTarget:self action:@selector(docBtnClicked:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:docBtn];

    
}

- (void)tempbtnClicked:(UIButton *)btn{
    XSVideoListViewController *listVC = [XSVideoListViewController new];
    listVC.localPath = [XSFileManager tempVideoDirectory];
    [self.navigationController pushViewController:listVC animated:YES];
    
}
- (void)docBtnClicked:(UIButton *)btn{
    XSVideoListViewController *listVC = [XSVideoListViewController new];
    listVC.localPath = [XSFileManager documentPath];
    [self.navigationController pushViewController:listVC animated:YES];

    
}

@end
